--Execute as OE
-- make sure you have run the tracetab.sql script first.
-- it is located under: /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/
-- You also need to run a code example from the previous lesson to create the P5 procedure.
-- The P5 definition is found in file code_09_23_n.sql.

ALTER SESSION SET PLSQL_DEBUG=true;
ALTER PROCEDURE P5 COMPILE DEBUG;
EXECUTE DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.trace_all_calls)
EXECUTE p5
EXECUTE DBMS_TRACE.CLEAR_PLSQL_TRACE

SELECT proc_name, proc_line, 
       event_proc_name, event_comment  
FROM sys.plsql_trace_events
WHERE event_proc_name = 'P5'
OR PROC_NAME = 'P5';
